projects
/
gtk4.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4f01c0b
)
GtkBookmarksManager: Only save if we have data to save
author
Colin Walters
<walters@verbum.org>
Thu, 9 May 2013 20:48:38 +0000
(16:48 -0400)
committer
Colin Walters
<walters@verbum.org>
Thu, 9 May 2013 20:48:38 +0000
(16:48 -0400)
Otherwise we write an empty file, which is lame.
gtk/gtkbookmarksmanager.c
patch
|
blob
|
history
diff --git
a/gtk/gtkbookmarksmanager.c
b/gtk/gtkbookmarksmanager.c
index e475ea0756b3f831c7d7164953c2941a7422aef9..c7eb0263370ce943e00a1474b0375e9fcf115fec 100644
(file)
--- a/
gtk/gtkbookmarksmanager.c
+++ b/
gtk/gtkbookmarksmanager.c
@@
-221,7
+221,8
@@
_gtk_bookmarks_manager_new (GtkBookmarksChangedFunc changed_func, gpointer chang
/* Read the legacy one and write it to the new one */
legacy_bookmarks_file = get_legacy_bookmarks_file ();
manager->bookmarks = read_bookmarks (legacy_bookmarks_file);
- save_bookmarks (bookmarks_file, manager->bookmarks);
+ if (manager->bookmarks)
+ save_bookmarks (bookmarks_file, manager->bookmarks);
g_object_unref (legacy_bookmarks_file);
}